﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BudgetApp.Data.Models
{
    public class TrackSpend
    {
        [Key]
        public int SpendId { get; set; }
        [Display(Name = "Date Spent")]
        public DateTime DateSpent { get; set; }
        public decimal Amount { get; set; }
        public string Where { get; set; }
        public string Notes { get; set; }

        [Display(Name = "Category")]
        public int CategoryType { get; set; }
        [ForeignKey("CategoryType")]
        public virtual Category Category { get; set; }

        [Display(Name = "SubCategory")]
        public int SubCategoryType { get; set; }
        [ForeignKey("SubCategoryType")]
        public virtual SubCategory SubCategory { get; set; }

        public int Type { get; set; }
        [ForeignKey("Type")]
        public virtual InputType InputType { get; set; }

        public string UserId { get; set; }
        [ForeignKey("UserId")]
        public virtual ApplicationUser User { get; set; }
    }
}
